package com.wei.czz.common.vo.admin.role;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.wei.czz.common.constant.Constant;
import com.wei.czz.common.constant.RedisConstant;
import com.wei.czz.common.constant.EntityConstant;
import com.wei.czz.common.vo.common.BaseVo;
import lombok.Getter;
import lombok.Setter;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wei
 * date: 2021-05-08 11:27:00
 * className: RoleFromVo 角色管理页面请求表单Vo类
 * version: 1.0
 * description:
 */
@Getter
@Setter
public class RoleFormVo extends BaseVo {

    /**
     * 角色键
     */
    private String roleKey;

    /**
     * 业务类型
     */
    private Integer businessType;

    /**
     * 构造系统角色列表缓存键
     * @return 键值
     */
    @JsonIgnore
    public String getRoleListKey() {
        return RedisConstant.STRING + EntityConstant.ROLE + Constant.UNDER + RedisConstant.LIST + roleKey
                + RedisConstant.SPLIT + businessType + RedisConstant.SPLIT + word + RedisConstant.SPLIT + status
                + RedisConstant.SPLIT + page + RedisConstant.SPLIT + limit + RedisConstant.SPLIT + field
                + RedisConstant.SPLIT + order;
    }

}
